home *** CD-ROM | disk | FTP | other *** search
- (*
- STRVCTVRA et PRINCIPIA MATHEMATICA
-
- NanoBBS
- (C) Copyright 1993-1996 Whirlwind Software
- ALL RIGHTS RESERVED
-
- NanoBBS: A kickass BBS with support for 3 type of msgbases, internal
- protocols, doors, no-nodelist netmail, Usenet and Internet Email hooks,
- the UFO Scripting language, fixed period or credit usage billing/expiry,
- on the fly true ANSI, RipScrip, hyper-fast file finding, etc etc etc.
- Designed to be fast and efficient, easy for both user and sysop to use.
-
- SOCIAL STATEMENT TO THIRD PARTY DEVELOPERS: *PLEASE* do not write
- code that physically inserts or deletes users from anywhere but the
- end of the user file! This practice has been used in third party user
- editors for other BBSes in the past and has caused the LASTREAD files
- used by Squish and *.MSG to become invalid! At the very least,
- consider using an active global lastread updater procedure if you MUST
- physically move, insert or delete user records!!!
-
- THESE STRUCTURES ARE NOT FINAL. Major structures such as the user record
- and config record have free space fields which may be used in the future,
- but existing fields will stay where they are. Do not use free space
- fields unless you want your ultilities to become obsolete next beta. To
- ensure compatibility, it is prudent to update the flat text configuration
- files whenever possible and then run MFB or MMB or CONFIG as needed.
- Whirlwind Software reserves the right to alter and/or augment these
- structures as it deems necessary.
-
- The user record structure will be changed in version 2.00! New
- structure source will be released along with a userbase conversion
- program when this happens, and NanoBBS 2.00 will recognize the old
- version file and convert it for you. The TCHAT.USR file will be
- eliminated and its fields added to the main structure, and a hyper-speed
- search index similar to that used in the file database will be put in
- place.
-
- *)
-
- type _pt=array[0..15] of record {Comm Port Record}
- base:word;
- irq :byte
- end;
-
- namestr=string[35]; {You may need to distinguish dos.namestr from this one in your code}
-
- type limit=record
- access, {Access level for this limit}
- time, {time per call}
- day, {time per day}
- ratio : word; {N:1 dl/ul ratio}
- maxk : longint; {Maximum kilobytes downloaded per day}
- maxfiles : word; {Maximum files downloaded per day}
- name : string[60]; {What we call this access level}
- cph : longint; {Credits per hour}
- end;
-
- baudrec=record
- setbaud, {Baud to set modem to, 0 if locked}
- baudrate : longint; {Baud rate for calculation - 0 if local}
- baudstr : string[6]; {Baud rate for display}
- connect : string[40]; {Connect string as returned by modem}
- end;
-
- addrec=record
- zone,
- net,
- node,
- point : integer;
- end;
-
- accessrecord=record {Access classes used by NanoCHAT}
- sysop,
- vip,
- normal,
- loser,
- newuser : limit;
- end;
-
- compressrec=record
- name:string[40];
- extension:string[3];
- viewcommand,
- addcommand,
- extractcommand:string[80];
- idoffset:longint; {offset of bytes within file which ID file}
- idlen:byte; {number of ID bytes within file}
- idbytes:array[1..8] of byte; {the actual bytes}
- end;
-
-
- configrec =
- record
- fileid : longint; {Always $54484332 "THC2"}
- comport : byte; {Com port, 0 is local only}
- node : word; {Task number}
- syspass, {System Password}
- nup : string[12]; {New User Password}
- initbaud, {Baud to initialise modem - 0 if lock}
- slowbaud : longint; {Slowest baud rate to allow on}
- bauds : array[0..19] of baudrec; {Baud config}
- ring : string[20]; {String for ring}
- answer : string[20]; {Answer string}
- init : string[60]; {Init string}
- nocarrier : string[20]; {No Carrier String}
- ok : string[20]; {OK string}
- initretry : byte;
- rings : byte; {Number of rings to answer}
- textpath,
- syspath, {System Files Path}
- msgbasepath : string[60]; {Message Base Path}
- systemname : string[72];
- sysopname : namestr;
- systemcity : namestr;
- systemphone : string[20];
- echochar : char;
- passwordtries:byte;
- asknew : word; {16 booleans determining what new users should be asked}
- logontime : byte; {Minutes allowed in logon process}
- timeout : byte; {Minutes to time out}
- bangaccess : word; {Access required to use Bang Prompt}
- unused_x : word;
- usrstart, {When to start answering phone}
- usrend, {When to stop answering phone}
- chatstart, {When to start allowing chat}
- chatend : longint; {When to stop allowing chat}
- newaccess,
- sysopaccess : word;
- newkeys,
- sysopkeys : word;
- fastanswer : boolean;
- ramdisk : string[60]; {Drive and directory of ramdisk}
- temppath : string[60]; {Where to place temporary files}
- scanpath : string[60]; {Where to put user msgscan files}
- threshold : longint; {Download limit threshold}
- ulreward : longint; {Percentage of uploads to reward}
- firstbull : string[13]; {pathless filename of first bulletin menu .NIX file}
- access_files,
- access_expired,
- access_doors,
- access_userlist,
- access_callog,
- access_page,
- access_info,
- access_qwk,
- access_email,
- access_kill,
- access_post,
- access_read,
- access_scan,
- access_newscan,
- access_batch,
- access_download,
- access_upload,
- access_filelist,
- access_newfiles,
- access_fsearch:word; {Access levels for many functions}
- autoansi:word; {milliseconds to wait for auto-ansi}
- warn1,
- warn2: word; {Seconds-until-logoff for warnings}
- hitenter:boolean;
- startfile:string[72]; { Starting UFO file (before logon) }
- { NanoBBS will use canned logon if this }
- { is blank }
- mainfile:string[72]; {Main UFO file, canned main menu if blank (after logon)}
- wideopen:boolean; {If true BBS skips logon procedure completely}
- defaultlang:string[8]; {base filename of default language - usu. ENGLISH}
- language:array[1..32] of string[8]; {Language filenames}
- ovrstr:string[100];
- ovrkey:array[1..100] of string[9];
- optnew:word; {16 booleans determining which asked questions are optional}
- initfreq:byte; {time between modem inits in minutes}
- f_files:string[72];
- f_message:string[72];
- f_doors:string[72];
- qwkpath:string[60];
- qwkid:string[8];
- compress:array[1..16] of compressrec;
- netmachine:string[16]; {Internet machine name}
- netaddress:string[80]; {Internet site address, e.g. thc.spydernet.com}
- timezone:string[8]; {Time zone string code}
- greenwich1:shortint; {Hours from UTC in standard time, e.g. PST is -8}
- greenwich2:shortint; {Hours from UTC in daylight time, e.g. PDT is -7}
- anonstring:string[36]; {The string to substitute when a person posts anonymously}
- netmailkillsent, {If true netmail will be marked kill/sent}
- netmailcrash:boolean; {If true netmail will be marked crash}
- creditsystem:boolean; {If true, this is a credit-based system}
- spinstring:string[16]; {String defining the "Spinny" cursor}
- swapems:boolean; {If true, swap to EMS when swapping out}
- maxbankdep:longint; {maximum allowed deposit}
- maxbankwd:longint; {maximum allowed withdrawal}
- wraplongdesc:boolean; { If true BBS will ignore line breaks in long}
- { descriptions and attempt to wrap the }
- { descriptions optimally }
- ipcpath:string[60]; {path to IPC files for NanoCHAT etc}
- multinode:boolean; {If true IPCs will be used}
- access_multi:word;
- pagemusic:string[72]; {Filename of PagePlay file for sysop paging noise}
- nextmusic:string[72]; {Not used at this time}
- fatalmusic:string[72]; {Filename of PagePlay file for fatal error noise}
- usefilegroups:boolean; {If true Nano will use File Groups}
- chatprompt:boolean; {If true, most prompts will behave like NanoCHAT}
- access_validated, {Access to give reviewed users}
- access_nixad :word; {Access to be allowed to use NixAd}
- bankul:boolean; {If true, time for uploads is automatically banked}
- postfreeze:boolean; {If true, clock is frozen during posting}
- rewardprivate:boolean; {If true, post rewards apply to private msgs too}
- rewardcutoff:integer; {Number of lines to qualify for postreward2}
- postreward1, {Minutes to add to timebank for posting <rewardcutoff lines}
- postreward2:integer; {Number of minutes to add to timebank for posting >=rewardcutoff lines}
- ulby:boolean; {If TRUE Nano will append an "Uploaded By:" to file descriptions}
- hidesysop:boolean; {If True Sysop not counted in daily call logs}
- lockedbaud:boolean;
- qwklimit:word; {Max number of messages per QWK packet}
- nodoorscreenrestore:boolean;
- globalemailscan: boolean; {If true, users new email scans are global}
- porttable:_pt; {Com port table for internal comm driver}
- nofossil:boolean; {If true use BBS's internal comm driver instead of FOSSIL}
- privatemsg:longint;
- fovrstr:string[30]; {This and fovrkey allow key overrides in the file section}
- fovrkey:array[1..30] of string[9];
- noonewordnames:boolean; {If true, NanoBBS will prohibit one word names in new user signup}
- noonewordreals:boolean; {If true, NanoBBS may allow one word usernames but will prohibit one word real names}
-
- freespace :array[1..6908] of byte; {Pad it to 16384 bytes}
- beta_id :string[5]; {ASCII Beta identifier - contains ***** if not a beta}
- version_id:string[5]; {ASCII Version of BBS created for}
- end;
-
- { asknew significance:
-
- bit meaning
- --- -------
- F [ unused ]
- E [ unused ]
- D [ unused ]
- C [ unused ]
- B [ unused ]
- A [ unused ]
- 9 Ask Language
- 8 Ask Editor
- 7 Ask Location
- 6 Ask Real Name
- 5 Ask Phone
- 4 Ask New Scan
- 3 Ask Screen Parms
- 2 Ask Birthdate
- 1 Ask Gender
- 0 [ unused ]
- }
-
- userrec=record
- uuid:longint;
- username,
- realname,
- location : namestr;
- password : string[12];
- phone : string[20];
- access : word;
- lastcall,
- firstcall: longint;
- downloads: longint; {Downloads in k}
- uploads : longint; {Uploads in k}
- calls : word;
- calltoday: word;
- elapsed : word;
- todayk : word;
- birthdate: string[8];
- keysold : word; {Bitmap keys 0..F}
- attribute: word; {Bitmap attribute}
- posts : word;
- lines,
- columns : byte;
- expiry : longint; {Expiry Date}
- bank : integer; {Minutes in the time bank}
- unused3 : byte;
- keys : longint;
- inetname : string[9]; {Internet name, 9 chars}
- notused : word;
- misc : array[1..4] of longint;
- lastwd, {ds1970 of last time bank withdrawal}
- wdtoday : word; {time bank withdrawal minutes today}
- credit, {Credit}
- pending : longint; {Value of unsent netmail in credits}
- unused2 : array[1..3] of byte;
- chatrc : word; {Abs. Record # in TCHAT.USR}
- language : string[8];
- protocol : char;
- archiver : byte;
- end;
-
- usrhashrec=record
- hashname,
- hashreal,
- recnum:longint;
- end;
-
- {Meanings of attributes:
-
- Bit Meaning
- --- -------
- 8000 F - 1=female 0=male
- 4000 E - Account suspended
- 2000 D - No Time Limit
- 1000 C - No Ratio
- 800 B - Clear Screen
- 400 A - Use linefeeds
- 200 9 - Check for new mail
- 100 8 - Sex Undisclosed
- 80 7 - [ unused ]
- 40 6 - Use FS Editor
- 20 5 - [ unused ]
- 10 4 - Has been reviewed by sysop
- 8 3 - Goofus (Page Squelch)
- 4 2 - ANSi On
- 2 1 - Toast
- 1 0 - Account Deleted
- }
- LASTCALLrecord = record
- callnum : longint;
- node : Byte;
- Name : namestr;
- Baud : longint;
- Times : LongInt;
- LogOn : longint; {Second-of-the-day}
- LogOff : longint;
- end;
-
- SYSINFOrecord = record
- TotalCalls : LongInt;
- LastCaller : namestr;
- CallsToday : Word;
- ConnectsToday : word;
- poststoday,
- ultoday,
- dltoday : word;
- lastconnect : longint;
- date : word;
- nocd : boolean;
- expansion : array[1..64] of byte;
- end;
-
- const base_sq:byte=0;
- base_fido:byte=1;
- base_jam:byte=2;
-
- type
-
- {Note - if BaseType is 255 then this is not a message base but a "divider" to }
- { make message area lists look neater. }
- { In dividers, the ATTACHPATH contains the string to use in the divider }
- { There is a sysmsg in which that name is parameter[1] }
- { Optionally a pathed filename of a compiled UFO file can be provided }
- { This filename is provided in the PATH field. If it is present Nano }
- { will present that UFO file instead of displaying the relevant SysMsg }
- { In a divider, the NUMBER field is always -1 }
- { Dividers are only recognized by MMB 2.0 and later }
- messagerec =record
- number : longint;
- basetype: byte; {0=Squish,1=SDM,2=JAM,255=NotABase}
- name : string[60];
- attachpath,
- path : string[72];
- attachaccess,
- anonaccess,
- bogusaccess,
- postaccess,
- access : word;
- postkeys,
- keys : word;
- address : addrec;
- origin : string[60];
- attr2,
- attr : word;
- maxmsg : word;
- age : byte;
- qwkname : string[13];
- newsgroup:string[78]; {Newgroup for RFC headers}
- divert : longint;
- destination:addrec; {Force this dest if netmail area}
- recordnum:longint; {Physical record number}
- version : word; {MMB version which created this record}
- freespace:array[1..14] of byte;
- end;
-
-
- {messagerec.attr significance:
-
- bit 0x8000 - Females only may enter this base
- 0x4000 - Males only may enter this base
- 0x2000 - Base is read-only
- 0x1000 - Base is echomail
- 0x0800 - Base is netmail
- 0x0400 - Base is private only
- 0x0200 - Base is public only
- 0x0100 - Hi-bit characters allowed
- 0x0080 - ANSi allowed
- 0x0040 - NanoBBS tokens allowed
- 0x0020 - Use real name (off=use username)
- 0x0010 - Allow anonymous posting
- 0x0008 - Allow bogus posting
- 0x0004 - CENSORED!
- 0x0002 - File Attach Allowed
- 0x0001 - Kludge real name
-
- attr2 significance:
- bit 0x8000 - Internet email base
- bit 0x4000 - Usenet newsgroup
- bit 0x2000 - Add RFC-1036 header
- bit 0x1000 - Barricade area
- bit 0x0800 - Use the destination address instead of asking for netmail address
- bit 0x0400 - First try to reply to parsed Internet address
- bit 0x0200 - If to: appears to be on inet, change area to msg.divert
-
- }
-
- {
-
- The FAINFO file contains records of information about the individual
- file areas.
-
- ATTR field: bit F - Area is a CD-ROM, use temporary dir, no uploads
- E - No uploads allowed
- D - Area uses indented continuation in FILES.BBS
- C - FILES.BBS lines already have filesize/date
- B - Do not include area in MASTER.FIL
- A - [ unused ]
- 9 - [ unused ]
- 8 - [ unused ]
- 7 - [ unused ]
- 6 - [ unused ]
- 5 - [ unused ]
- 4 - [ unused ]
- 3 - [ unused ]
- 2 - [ unused ]
- 1 - [ unused ]
- 0 - VOID - area is invalid!
-
- Note: the UNUSED byte is now used to indicate if the file area is
- actually a divider. If UNUSED is 255, the entry is a divider.
- The divider text is stored in ULPATH and the filename is in DLPATH. NAME
- is not used.
-
- }
-
- fainfo = record
- number:longint; {File Area Number}
- name:namestr; {File Area Name as seen by user}
- filesbbspath, {Path for FILES.BBS}
- dlpath, {Path for downloads}
- ulpath:string[72]; {Path for uploads}
- access:word; {Required Access}
- age:byte;
- ulaccess,
- dlaccess,
- ulkeys,
- dlkeys:longint; {Unused}
- keys:longint; {Required Keys}
- attr:word; {Attributes - see above}
- unused:byte;
- group:byte;
- freespace:array[1..16] of byte;
- end;
- (*
- bulltype=record
- key : char;
- display : string[127]; {What to display}
- filename : string[60]; {Filename of bulletin or menu}
- link : boolean; {If false, this record is an actual bulletin}
- quit : boolean; {If true, the key will actually quit}
- end;
- *)
- callerrec=record
- location,
- username,
- realname : namestr;
- time,
- number : longint;
- baud : string[10];
- end;
-
- doortype=record
- key:char; {Key which opens the door}
- path:string[60]; {Directory to write DORINFO1.DEF and log to}
- command:string[72]; {Command and all parameters necessary}
- swap:boolean; {If true we will attempt a swapout type drop}
- access:word; {Required access}
- keys:word; {Required keys}
- flavour:byte; {0=DORINFO1.DEF 1=DORINFOx.DEF}
- age:integer; {minimum age to play}
- fossilhot:boolean; {true:leave FOSSIL hot (shd be true most doors)}
- realname:boolean; {true: use REAL name instead of pseudo}
- fakelastname:string[16]; {What to put for users with one word handles when a door requires a last name}
- fakebaud:longint; {A fake baud rate to kludge in for lame doors}
- expansion:byte;
- freespace:array[1..32] of byte;
- end;
-
- evtrec=record
- Name:string[60];
- time:array[1..32] of longint;
- errorlevel:byte;
- attr:byte;
- spare:byte;
- end;
-
- {Event attribute bits: $80=forced}
-
- grouprec=record
- number:byte;
- name:string[72];
- keys:word;
- access:word;
- end;
-
- _idxrecord=record {Structure of records in MASTER.IDX}
- name:string[12];
- area:longint;
- offset:longint;
- end;
-
- {Structure of MASTER.PRE}
- preidxarray=array[1..27,1..27] of longint; {1,1=AA 27,27=##}
-
- { Note: MASTER.FIL is a flat ASCII file which is trivially reverse }
- { engineered. }
-
- (* External Protocols are not yet a feature of NanoBBS so this structure is *)
- (* not official and will probably be changed. *)
-
-
- extproto=record
- name:string[40];
- key:char;
- uploadcmd:string[80];
- downloadcmd:string[80];
- flavour:byte; {bitmap $01=batch $02=bidir}
- uploadlogfile:string[80];
- downloadlogfile:string[80];
- downloadlistname:string[80];
- end;
-
-